package com.chagee.channel.server.enums;

import java.util.stream.Stream;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 子系统枚举
 *
 * @author: chang.jiawei
 * @date: 2024/01/18
 */
@Getter
@AllArgsConstructor
public enum SubsystemEnum {

    STORE("门店"),
    PRE_BUILD("营建"),
    JOIN("招商"),
    ORDER("订单"),
    CONTRACT("合同"),
    INSPECTION("巡检"),
    ;

    private final String name;

    public static SubsystemEnum of(String code) {
        return Stream.of(SubsystemEnum.values()).filter(v -> v.name().equalsIgnoreCase(code)).findFirst().orElse(null);
    }

}
